Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Checking /sys/block to find scheduler(s). Issues 1276, 1325 #1394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xnoguer
Copy link
Contributor

@xnoguer xnoguer commented May 17, 2023

Pull request that fixes issues 1325 and 1276. It checks /sys/block/*/queue/scheduler, and sets LINUX_KERNEL_IOSCHED with the scheduler of the last block device checked. A few observations:

  • Was tested in Debian 11. Including a machine with more than one block device.
  • It sets LINUX_KERNEL_IOSCHED with the scheduler of the last block device checked. I don't see Lynis does anything with this value later on (linux_kernel_io_scheduler in lynis-report.dat), so I don't know what would be done with more than one value for the scheduler (different scheduler for different devices).
  • I recommend to ignore/hide whitespace when reviewing the changes in code.
  • When testing behaviour for different schedulers this can be useful:
    xnoguer@ip:$ cat /sys/block/xvda/queue/scheduler
    mq-deadline [kyber] none
    xnoguer@ip:
    $
    xnoguer@ip:$ sudo echo "deadline" | sudo tee /sys/block/xvda/queue/scheduler
    deadline
    xnoguer@ip:
    $ cat /sys/block/xvda/queue/scheduler
    [mq-deadline] kyber none

@xnoguer xnoguer changed the title Checking /sys/block to find scheduler(s) Checking /sys/block to find scheduler(s). Issues 1276, 1325 May 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant